﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Core;
public partial class ThongKe_PageCanBoKhenThuong : System.Web.UI.Page
{
    public int total = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            BinData();



        }
    }

    void BinData()
    {

        int pageSize = 10;

        int pageNum = 1;
        if (Request.QueryString[PagingControl1.QueryStringKey] != null)
        {
            pageNum = int.Parse(Server.HtmlEncode(Request.QueryString[PagingControl1.QueryStringKey]));
        }
        else pageNum = 1;


        rptData.DataSource = CanBo.Paging_CanBo_DuocKhenThuong(pageSize, pageNum, out total);

        rptData.DataBind();

        PagingControl1.TotalRecord = total;
        PagingControl1.CurrentPage = pageNum;
        PagingControl1.PageSize = pageSize;

    }
    protected void btnRefresh_ServerClick(object sender, EventArgs e)
    {
        Response.Redirect(Request.Url.AbsolutePath);
    }
}